------------------------------------------------------------------------------------------------------------------------------------
      name:  plog_815
       log:  /accounts/projects/jr_ra/GRscarring/erratum/programs/prepare/combinecollapse.log
  log type:  text
 opened on:  27 Nov 2024, 17:36:06

. ********************************************************************************
. 
. * combinecollapse.do
. * Combines the collapsed bigcps, march, and org files, and merges on the unemployment rates
. *
. * Edit history:
. *  JR, 4/10/18: Moved merge to unemployment rate here, from collapse_bigcps and collapse_march
. *               Create a new "ur0" that uses state-level URs since 1976 and national URs previously.
. *  JR, 4/16/18: Edited March variable list to match stripped-down version. Need to change this back later.
. *  RY, 4/30/18: Edited to add on unemployment rate at age 18.    
. *  JR, 4/30/18: Cleaned up program to loop rather than repeating. 
. *  RY, 5/22/18: Added new topcoded annual earnings variable (to be used for main analysis)        
. *  JR, 1/9/18:  Minor adjustments to use weights for those with non-missing earnings/wages.
. *  NG, 8/28/2019: Minor adjustments to use 2019 data
. *  JR, 4/24/2020: Fix education fraction calculation -- previously wildly wrong
. 
. clear

. cap project, doinfo

. if _rc==0 {
.         local pdir "`r(pdir)'"                                                      // the project's main dir.
.         local dofile "`r(dofile)'"                                                  // do-file's stub name
.         local sig {bind:{hi:[`dofile'.dta. RP : `dofile'.do, `c(current_date)']}}       // a signature in notes
.         local doasproject=1
. }

. else {
.         local pdir "~/GRscarring"
.         local dofile "combinecollapse"
.         local doasproject=0
. }

. 
. set more off

. local rootdir "`pdir'"

. local thisdir "`pdir'"

. local scratch "`pdir'/scratch"

. 
. if `doasproject'==1 {
.         project, uses("`scratch'/statepop.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/statepop.dta" filesig(3467904037:115254
> )
.         project, uses("`scratch'/unrate_national.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/unrate_national.dta" filesig(1052845851
> :51188)
.         project, uses("`scratch'/unrate_state.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/unrate_state.dta" filesig(3849316085:13
> 84205)
.         project, uses("`scratch'/collapse_bigcps_yc.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_bigcps_yc.dta" filesig(2559044
> 711:462779)
.         project, uses("`scratch'/collapse_march_yc.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_march_yc.dta" filesig(34104070
> 3:752821)
.         project, uses("`scratch'/collapse_org_yc.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_org_yc.dta" filesig(1396328040
> :173008)
.         project, uses("`scratch'/collapse_bigcps_yca5.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_bigcps_yca5.dta" filesig(34053
> 62549:1698773)
.         project, uses("`scratch'/collapse_march_yca5.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_march_yca5.dta" filesig(392234
> 0501:3085103)
.         project, uses("`scratch'/collapse_org_yca5.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_org_yca5.dta" filesig(59209025
> 7:825902)
.         project, uses("`scratch'/collapse_bigcps_yca5s.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_bigcps_yca5s.dta" filesig(4075
> 547868:83545866)
.         project, uses("`scratch'/collapse_march_yca5s.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_march_yca5s.dta" filesig(70972
> 8107:136472225)
.         project, uses("`scratch'/collapse_org_yca5s.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_org_yca5s.dta" filesig(3662349
> 351:40435801)
.         project, uses("`scratch'/collapse_bigcps_yca4.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_bigcps_yca4.dta" filesig(22784
> 71126:1453194)
.         project, uses("`scratch'/collapse_march_yca4.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_march_yca4.dta" filesig(106974
> 2586:2490835)
.         project, uses("`scratch'/collapse_org_yca4.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_org_yca4.dta" filesig(21494842
> 13:666156)
.         project, uses("`scratch'/collapse_bigcps_yca4s.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_bigcps_yca4s.dta" filesig(1902
> 591548:72586127)
.         project, uses("`scratch'/collapse_march_yca4s.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_march_yca4s.dta" filesig(67977
> 6490:116522914)
.         project, uses("`scratch'/collapse_org_yca4s.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_org_yca4s.dta" filesig(6653709
> 58:33286908)
.         project, uses("`scratch'/collapse_bigcps_yca2.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_bigcps_yca2.dta" filesig(13557
> 78008:862453)
.         project, uses("`scratch'/collapse_march_yca2.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_march_yca2.dta" filesig(246686
> 2194:1217395)
.         project, uses("`scratch'/collapse_org_yca2.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_org_yca2.dta" filesig(30430048
> 35:298673)
.         project, uses("`scratch'/collapse_bigcps_yca2s.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_bigcps_yca2s.dta" filesig(3604
> 218226:42238632)
.         project, uses("`scratch'/collapse_march_yca2s.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_march_yca2s.dta" filesig(79846
> 4118:57720011)
.         project, uses("`scratch'/collapse_org_yca2s.dta")
project GRscar_erratum > do-file uses: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/collapse_org_yca2s.dta" filesig(2963185
> 735:14662449)
. }

. 
. 
. local dvlist_cps "labfor empl unem married hourslw hourslw_pos uhours livewithprnt chld_pr educ_occup lives_spouse_oth"

. 
. *local dvlist_march "week_unemployed week_out_lf week_unempl_pos week_out_lf_pos unemployed_ever out_lf_lastyr"
. *local dvlist_march "`dvlist_march' employed_ly ann_inc ann_ern ann_inc_pos ann_ern_pos log_ann_ern log_ann_inc"
. *local dvlist_march "`dvlist_march' wkswork wkswork_pos hrswk_ly hrswk_ly_pos"
. local dvlist_march "log_pearnval_tc_r pearnval_tc_r earn_r_pos earn_r_pos_tc log_earn_r_pos log_earn_r_pos_tc inc_r_pos inc_r_pos_
> tc log_inc_r_pos log_inc_r_pos_tc wkswork wkswork_pos tcwsval tcernval posinc posearn"

. *local dvlist_march "pearnval_r pearnval_r_tc lpearnval_r lpearnval_r_tc posearn"
. *local dvlist_org "paidhre rw rw_l rw_cepr rw_nber hours_jr wage_occup log_wk_ern"
. *local dvlist_org "paidhre rw rw_l rw_nber wage_occup uhourse log_wk_ern"
. local dvlist_org "rw rw_l rw_nber rw_nber_l rwage_occup usualhoursi"

. 
. *Prepare population and unemployment rates to merge on, at year-cohort and year-state-cohort levels
.  // Make national version of population dataset
.   use `scratch'/statepop

.   collapse (sum) pop, by(year)

.   tempfile natlpop

.   save `natlpop'
file /tmp/St2868349.000004 saved as .dta format

.  // Make annual versions of unemployment rates
.   use `scratch'/unrate_national

.   isid yearmo

.   sort yearmo

.   gen year=yofd(dofm(yearmo))

.   bys year (yearmo): keep if _n==_N
(805 observations deleted)

.   keep year ur_nat_annual ur_nat_3yr_avg

.   label var ur_nat_annual "Unemployment rate (national)"

.   tempfile natlur

.   save `natlur'
file /tmp/St2868349.000005 saved as .dta format

.   merge 1:1 year using `natlpop', nogen assert(1 3)

    Result                      Number of obs
    -----------------------------------------
    Not matched                            25
        from master                        25  
        from using                          0  

    Matched                                49  
    -----------------------------------------

.   tempfile popur_n

.   save `popur_n'
file /tmp/St2868349.000006 saved as .dta format

.   // Have UR 1947-2017, pop only 1970-2017
.  // Make state version of unemployment rate  
.   use `scratch'/unrate_state

.   isid fipsst yearmo

.   sort fipsst yearmo

.   gen year=yofd(dofm(yearmo))

.   bys fipsst year (yearmo): keep if _n==_N
(24,735 observations deleted)

.   keep fipsst year ur_st_annual ur_st_3yr_avg

.   label var ur_st_annual "Unemployment rate (state)"

.   tempfile stateur

.   save `stateur'
file /tmp/St2868349.000007 saved as .dta format

.   merge 1:1 fipsst year using `scratch'/statepop, nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                           408
        from master                       102  
        from using                        306  

    Matched                             2,193  
    -----------------------------------------

.   sort fipsst year

.   bysort fipsst: replace state_name = state_name[1] if missing(state_name)
(102 real changes made)

.  merge m:1 year using `popur_n', keepusing(year ur_nat_annual ur_nat_3yr_avg) assert(2 3) keep(3) nogen

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,601  
    -----------------------------------------

. 
.   tempfile popur_s

.   save `popur_s'
file /tmp/St2868349.000008 saved as .dta format

.  
.  foreach set in yc yca5 yca5s yca4 yca4s yca2 yca2s yca2ss {
  2.    if inlist("`set'", "yca5", "yca5s") local edvar educ5
  3.    if inlist("`set'", "yca4", "yca4s") local edvar educ4
  4.    if inlist("`set'", "yca2", "yca2s", "yca2ss") local edvar educ2
  5.   
.    if "`set'"=="yc" local ids "cohort year"
  6.    if inlist("`set'", "yca5", "yca4", "yca2") local ids "cohort year `edvar'"
  7.    if inlist("`set'", "yca5s", "yca4s", "yca2s") local ids "cohort year fipsst `edvar'"
  8.    if inlist("`set'", "yca2ss") local ids "cohort year fipsst `edvar' sex"
  9.    tempfile bigcps_`set' march_`set' org_`set'
 10. 
.    use `scratch'/collapse_bigcps_`set', clear
 11.    rename wgt_composite bigcpswgt
 12.    rename n_obs bigcps_`set'
 13.    gen fromcps=1
 14.    save `bigcps_`set''
 15.    use `scratch'/collapse_march_`set', clear
 16.    rename marsupwt marchwgt
 17.    rename marsupwt_log_pearnval_tc_r marchwgt_log_pearnval_tc_r
 18.    drop married 
 19.    cap drop ed_*
 20.    gen frommarch=1
 21.    save `march_`set''
 22.    use `scratch'/collapse_org_`set', clear
 23.    gen fromorg=1
 24.    save `org_`set''
 25.    use `bigcps_`set''
 26.    merge 1:1 `ids' using `march_`set'', nogen /*update*/
 27.    merge 1:1 `ids' using `org_`set'', nogen 
 28. 
.    gen age=year-cohort
 29.    // Compute education shares
.     if inlist("`set'", "yca5", "yca4", "yca2", "yca5s", "yca4s", "yca2s", "yca2ss") {
 30.       sort cohort year `edvar' 
 31.       tempvar totsize edsize
 32.       by cohort year: egen double `totsize'=total(bigcpswgt)
 33.       by cohort year `edvar': egen double `edsize'=total(bigcpswgt)
 34.       gen edfr_yc=`edsize'/`totsize'
 35.       drop `totsize' `edsize'
 36.     }
 37.     if inlist("`set'", "yca5s", "yca4s", "yca2s", "yca2ss") {
 38.       sort cohort year fipsst `edvar'
 39.       tempvar totsize_st edsize_st
 40.       by cohort year fipsst: egen double `totsize_st'=total(bigcpswgt)
 41.       by cohort year fipsst `edvar': egen double `edsize_st'=total(bigcpswgt)
 42.       gen edfr_ycs=`edsize_st'/`totsize_st'
 43.       drop `totsize_st' `edsize_st'
 44.     }
 45. 
.    // Merge on population and UR
.    cap drop ur* 
 46.    cap drop pop
 47.    if inlist("`set'", "yc", "yca5", "yca4", "yca2") { 
 48.     // merge on national UR
.      merge m:1 year using `popur_n', assert(2 3) keep(3) nogen 
 49.      rename ur_nat_annual ur_nat
 50.      // And merge on age-22 UR 
.       rename year origyr
 51.       gen year=cohort+22
 52.       merge m:1 year using `popur_n', keepusing(year ur_nat_annual) assert(1 3) nogen
 53.       rename ur_nat_annual ur0_nat_22
 54.       label var ur0_nat_22 "UR (natl) at age 22"
 55.       drop year 
 56.      // And merge on age-18 UR  
.       gen year=cohort+18
 57.       merge m:1 year using `popur_n', keepusing(year ur_nat_annual) assert(1 3) nogen
 58.       rename ur_nat_annual ur0_nat_18
 59.       label var ur0_nat_18 "UR (natl) at age 18"
 60.       drop year 
 61.      rename origyr year
 62.    //Missing ur0_nat for 1899-1924 and 1996-2001 birth cohorts 
.    // RY, 4/30/18, labels made above
.    }
 63.    else { 
 64.      // merge on state and national UR
.      // Merge on population and UR
.       merge m:1 fipsst year using `popur_s', assert(2 3) keep(3) nogen
 65.       rename ur_nat_annual ur_nat
 66.       rename ur_st_annual ur_st
 67.      // And merge on age-22 UR
.       rename year origyr
 68.       gen year=cohort+22
 69.       merge m:1 fipsst year using `popur_s', keepusing(year ur_nat_annual ur_st_annual) assert(1 3) nogen
 70.       rename ur_nat_annual ur0_nat_22  
 71.       label var ur0_nat_22 "UR (natl) at age 22"
 72.       rename ur_st_annual ur0_st_22
 73.       label var ur0_st_22 "UR (state) at age 22"  
 74.       drop year
 75.      // And merge on age-18 UR  
.       gen year=cohort+18
 76.       merge m:1 fipsst year using `popur_s', keepusing(year ur_nat_annual ur_st_annual) assert(1 3) nogen
 77.       rename ur_nat_annual ur0_nat_18
 78.       label var ur0_nat_18 "UR (natl) at age 18"
 79.       rename ur_st_annual ur0_st_18
 80.       label var ur0_st_18 "UR (state) at age 18"  
 81.      //Missing UR from pre 1969, post 2017.
.      drop year
 82.      rename origyr year
 83.      // Make a consolidated age-22 UR that uses national rate before 1976 and state rate before
.      // This makes it possible to include earlier cohorts in the analyses that control for the age-22 UR.
.       gen ur0_22=ur0_st_22
 84.       assert ur0_22==. if cohort<1954
 85.       replace ur0_22=ur0_nat_22 if cohort<1954
 86.       label var ur0_22 "Age-22 UR (nat pre-1976, state 1976-)"
 87.      //Make a consolidated age-18 UR that uses national rate before 1972 and state rate before
.       gen ur0_18=ur0_st_18
 88.       assert ur0_18==. if cohort<1958
 89.       replace ur0_18=ur0_nat_18 if cohort<1958
 90.       label var ur0_18 "Age-18 UR (nat pre-1972, state 1972-)"
 91.    }
 92.   rename cohort birthcohort
 93.   save `scratch'/combinecollapse_`set', replace
 94. 
.  }   
file /tmp/St2868349.000009 saved as .dta format
file /tmp/St2868349.00000a saved as .dta format
file /tmp/St2868349.00000b saved as .dta format

    Result                      Number of obs
    -----------------------------------------
    Not matched                           273
        from master                       169  
        from using                        104  

    Matched                             2,496  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                           104
        from master                       104  
        from using                          0  

    Matched                             2,665  
    -----------------------------------------
(variable year was int, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             2,769  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                           396
        from master                       396  
        from using                          0  

    Matched                             2,373  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                           496
        from master                       496  
        from using                          0  

    Matched                             2,273  
    -----------------------------------------
(file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yc.dta not found)
file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yc.dta saved
file /tmp/St2868349.00000c saved as .dta format
file /tmp/St2868349.00000d saved as .dta format
file /tmp/St2868349.00000e saved as .dta format
(variable educ5 was byte, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                         1,415
        from master                       900  
        from using                        515  

    Matched                            12,334  
    -----------------------------------------
(label attain_l already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                           557
        from master                       557  
        from using                          0  

    Matched                            13,192  
    -----------------------------------------
(466 missing values generated)
(variable year was int, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            13,749  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                         1,979
        from master                     1,979  
        from using                          0  

    Matched                            11,770  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                         2,480
        from master                     2,480  
        from using                          0  

    Matched                            11,269  
    -----------------------------------------
(file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca5.dta not found)
file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca5.dta saved
file /tmp/St2868349.00000f saved as .dta format
file /tmp/St2868349.00000g saved as .dta format
file /tmp/St2868349.00000h saved as .dta format
(variable educ5 was byte, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                       124,106
        from master                   102,879  
        from using                     21,227  

    Matched                           549,667  
    -----------------------------------------
(label attain_l already defined)

    Result                      Number of obs
    -----------------------------------------
    Not matched                        32,137
        from master                    32,109  
        from using                         28  

    Matched                           641,664  
    -----------------------------------------
(16,150 missing values generated)
(16,150 missing values generated)
(variable fipsst was byte, now double to accommodate using data's values)
(variable year was int, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           673,801  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                       312,668
        from master                   312,668  
        from using                          0  

    Matched                           361,133  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                       352,528
        from master                   352,528  
        from using                          0  

    Matched                           321,273  
    -----------------------------------------
(377,971 missing values generated)
(64,092 real changes made)
(417,057 missing values generated)
(64,107 real changes made)
(file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca5s.dta not found)
file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca5s.dta saved
file /tmp/St2868349.00000i saved as .dta format
file /tmp/St2868349.00000j saved as .dta format
file /tmp/St2868349.00000k saved as .dta format
(variable educ4 was byte, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                         1,105
        from master                       689  
        from using                        416  

    Matched                             9,937  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                           423
        from master                       423  
        from using                          0  

    Matched                            10,619  
    -----------------------------------------
(394 missing values generated)
(variable year was int, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                            11,042  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                         1,584
        from master                     1,584  
        from using                          0  

    Matched                             9,458  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                         1,984
        from master                     1,984  
        from using                          0  

    Matched                             9,058  
    -----------------------------------------
(file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca4.dta not found)
file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca4.dta saved
file /tmp/St2868349.00000l saved as .dta format
file /tmp/St2868349.00000m saved as .dta format
file /tmp/St2868349.00000n saved as .dta format
(variable educ4 was byte, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                        80,673
        from master                    63,409  
        from using                     17,264  

    Matched                           470,161  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                        22,661
        from master                    22,637  
        from using                         24  

    Matched                           528,197  
    -----------------------------------------
(14,778 missing values generated)
(14,778 missing values generated)
(variable fipsst was byte, now double to accommodate using data's values)
(variable year was int, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           550,858  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                       253,573
        from master                   253,573  
        from using                          0  

    Matched                           297,285  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                       284,965
        from master                   284,965  
        from using                          0  

    Matched                           265,893  
    -----------------------------------------
(306,040 missing values generated)
(51,298 real changes made)
(336,689 missing values generated)
(51,310 real changes made)
(file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca4s.dta not found)
file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca4s.dta saved
file /tmp/St2868349.00000o saved as .dta format
file /tmp/St2868349.00000p saved as .dta format
file /tmp/St2868349.00000q saved as .dta format

    Result                      Number of obs
    -----------------------------------------
    Not matched                           560
        from master                       351  
        from using                        209  

    Matched                             4,945  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                           216
        from master                       216  
        from using                          0  

    Matched                             5,289  
    -----------------------------------------
(187 missing values generated)
(variable year was int, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                             5,505  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                           792
        from master                       792  
        from using                          0  

    Matched                             4,713  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                           992
        from master                       992  
        from using                          0  

    Matched                             4,513  
    -----------------------------------------
(file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca2.dta not found)
file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca2.dta saved
file /tmp/St2868349.00000r saved as .dta format
file /tmp/St2868349.00000s saved as .dta format
file /tmp/St2868349.00000t saved as .dta format

    Result                      Number of obs
    -----------------------------------------
    Not matched                        34,265
        from master                    24,723  
        from using                      9,542  

    Matched                           239,129  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                        11,727
        from master                    11,726  
        from using                          1  

    Matched                           261,668  
    -----------------------------------------
(8,147 missing values generated)
(8,147 missing values generated)
(variable fipsst was byte, now double to accommodate using data's values)
(variable year was int, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           273,395  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                       127,058
        from master                   127,058  
        from using                          0  

    Matched                           146,337  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                       142,907
        from master                   142,907  
        from using                          0  

    Matched                           130,488  
    -----------------------------------------
(153,303 missing values generated)
(25,704 real changes made)
(168,809 missing values generated)
(25,704 real changes made)
(file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca2s.dta not found)
file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca2s.dta saved
file /tmp/St2868349.00000u saved as .dta format
file /tmp/St2868349.00000v saved as .dta format
file /tmp/St2868349.00000w saved as .dta format
(variable sex was byte, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                        85,349
        from master                    66,488  
        from using                     18,861  

    Matched                           455,610  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                        26,050
        from master                    26,041  
        from using                          9  

    Matched                           514,918  
    -----------------------------------------
(15,369 missing values generated)
(15,369 missing values generated)
(variable fipsst was byte, now double to accommodate using data's values)
(variable year was int, now double to accommodate using data's values)

    Result                      Number of obs
    -----------------------------------------
    Not matched                             0
    Matched                           540,968  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                       250,807
        from master                   250,807  
        from using                          0  

    Matched                           290,161  
    -----------------------------------------

    Result                      Number of obs
    -----------------------------------------
    Not matched                       282,767
        from master                   282,767  
        from using                          0  

    Matched                           258,201  
    -----------------------------------------
(303,179 missing values generated)
(51,396 real changes made)
(334,517 missing values generated)
(51,388 real changes made)
(file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca2ss.dta not found)
file /accounts/projects/jr_ra/GRscarring/erratum/scratch/combinecollapse_yca2ss.dta saved

. 
.  
. if `doasproject'==1 {
.   project, creates(`scratch'/combinecollapse_yc.dta)
project GRscar_erratum > do-file creates: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/combinecollapse_yc.dta" filesig(4188
> 613019:1425400)
.   project, creates(`scratch'/combinecollapse_yca5.dta)
project GRscar_erratum > do-file creates: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/combinecollapse_yca5.dta" filesig(21
> 81976067:6539810)
.   project, creates(`scratch'/combinecollapse_yca5s.dta)
project GRscar_erratum > do-file creates: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/combinecollapse_yca5s.dta" filesig(2
> 12175110:382778408)
.   project, creates(`scratch'/combinecollapse_yca4.dta)
project GRscar_erratum > do-file creates: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/combinecollapse_yca4.dta" filesig(13
> 32311642:5351071)
.   project, creates(`scratch'/combinecollapse_yca4s.dta)
project GRscar_erratum > do-file creates: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/combinecollapse_yca4s.dta" filesig(1
> 767204452:317354277)
.   project, creates(`scratch'/combinecollapse_yca2.dta)
project GRscar_erratum > do-file creates: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/combinecollapse_yca2.dta" filesig(42
> 25047055:2788601)
.   project, creates(`scratch'/combinecollapse_yca2s.dta)
project GRscar_erratum > do-file creates: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/combinecollapse_yca2s.dta" filesig(9
> 10481610:162185009)
.   project, creates(`scratch'/combinecollapse_yca2ss.dta)
project GRscar_erratum > do-file creates: "/scratch/public/jr_ra/GRscarring2024/erratum/scratch/combinecollapse_yca2ss.dta" filesig(
> 94228854:312199772)
. }

. 
end of do-file
      name:  plog_815
       log:  /accounts/projects/jr_ra/GRscarring/erratum/programs/prepare/combinecollapse.log
  log type:  text
 closed on:  27 Nov 2024, 17:37:05
------------------------------------------------------------------------------------------------------------------------------------
